package com.bifrost.model;

import com.bifrost.model.MediaModel;
import com.bifrost.model.OptionModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.NotBlank;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * @author 里昂
 * @com.bifrost.model
 * @wechat-mall
 * @lee Create Class on 2018/4/4
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ProductSkuModel implements Serializable{

    private Long skuId;

    /*@ApiModelProperty(name = "retailPrice" , value = "零售价")
    private BigDecimal retailPrice;*/

    @ApiModelProperty(name = "salePrice" , value = "销售价")
    private BigDecimal salePrice;

    /*@ApiModelProperty(name = "skuCost" , value = "成本价")
    private BigDecimal skuCost;*/

    protected Integer quantityAvailable = 0;

    private String skuName;

    private int sortOrder = 1;
    private Long productId;
    private Boolean available;

    /** 商品sku图片*/
    private List<MediaModel> mediaList;
    /** 商品sku规格*/
    private List<OptionModel> optionModels;
    private Integer bonusPointsRate;

    /* @NotNull(message = "商品有效日期不能为空")
    *//** 格式化时间  序列化时候获取  @DateFormat 反序列封装*//*
    @JsonFormat(timezone = "GMT+8" , pattern = "yyyy-MM-dd HH:mm:ss")
    private Date activeStartDate;
    @NotNull(message = "商品过期日期不能为空")
    @Future(message = "商品过期日期必须在当前日期之后")
    @JsonFormat(timezone = "GMT+8" , pattern = "yyyy-MM-dd HH:mm:ss")
    private Date activeEndDate;
    //@NotNull(message = "是否可添加到购物车不能为空")
    private Boolean canAddCart = Boolean.TRUE;

    @ApiModelProperty(name = "fulfillmentType" , value =    "<p> 快递类型默认:既可快递又可到店" +
                                                            "SELF_DELIVERY :  自提或配送至门店</br>"+
                                                            "DELIVERY :  快递</br>"+
                                                            "BOTH :  既可快递又可到店</br>"+
                                                            "</p>")
    private String fulfillmentType = ShippingType.BOTH;
    @ApiModelProperty(name = "fulfillmentType" , value =    "<p> 库存类型默认:总是可用的" +
                                                             "ALWAYS_AVAILABLE :     总是可用</br>"+
                                                             "UNAVAILABLE :          不可用</br>"+
                                                             "CHECK_QUANTITY :       需要检查数量</br>"+
                                                             "</p>")
    private String inventoryType = InventoryType.ALWAYS_AVAILABLE;

    private Boolean available = Boolean.TRUE;

    private Boolean discountable = Boolean.TRUE;*/

    /*private BigDecimal skuWeight=BigDecimal.ZERO;
        private String skuDescription;

    private BigDecimal skuWidth;
    private BigDecimal skuGirth;*/


   /* private Boolean canPreorder = Boolean.FALSE;
    *//**预订有效时间*//*
    private Integer preorderDays = 0;

    private Integer guaranteesDays = 0;

    @ApiModelProperty(name = "itemType" , value = "商品类型: {BASIC:基础商品.BUNDLE:绑定商品.GIFTWRAP:赠品.DIGITAL:数码商品.SERVICE:服务.}")
    private String itemType = OrderItemType.BASIC;*/

    /** 是否可促销*/
   /* private Boolean promotable = Boolean.TRUE;

    private String weightUnitOfMeasure;

    private String skuCode;*/
    /** 规格描述*/
    //private String model;
    /** 生产地*/
    //@NotBlank(message = "生产地不能为空")
    // private String originPlace;
}
